[SPARK-25817][SQL] Dataset encoder should support combination of map and product type#22812
[SPARK-25817][SQL] Dataset encoder should support combination of map and product type#22812cloud-fan wants to merge 3 commits intoapache:masterfrom
Conversation
There was a problem hiding this comment.
these are unrelated, but is a followup of #16986 to address the remaining code style comments.
|
Test build #97959 has finished for PR 22812 at commit
|
|
retest this please |
|
Test build #97965 has finished for PR 22812 at commit
|
There was a problem hiding this comment.
unrelated but to fix minor code style issues in #22749
|
Test build #98019 has finished for PR 22812 at commit
|
|
retest this please |
|
Test build #98020 has finished for PR 22812 at commit
|
|
Test build #98026 has finished for PR 22812 at commit
|
There was a problem hiding this comment.
When u.child is resolved, is there still UnresolvedExtractValue?
There was a problem hiding this comment.
Yea I think so. The UnresolvedExtractValue might appear in CatalystToExternalMap.keyLambdaFunction and valueLambdaFunction
There was a problem hiding this comment.
ResolveReferences might also process that, but it is also good to have them here.
There was a problem hiding this comment.
TBH I don't quite remember why I did this for MapObjects, so I just follow it here. Maybe we can remove it in a followup PR.
|
LGTM |
|
Test build #98062 has finished for PR 22812 at commit
|
|
retest this please |
|
Test build #98147 has finished for PR 22812 at commit
|
|
thanks, merging to master! |
…and product type ## What changes were proposed in this pull request? After apache#22745 , Dataset encoder supports the combination of java bean and map type. This PR is to fix the Scala side. The reason why it didn't work before is, `CatalystToExternalMap` tries to get the data type of the input map expression, while it can be unresolved and its data type is known. To fix it, we can follow `UnresolvedMapObjects`, to create a `UnresolvedCatalystToExternalMap`, and only create `CatalystToExternalMap` when the input map expression is resolved and the data type is known. ## How was this patch tested? enable a old test case Closes apache#22812 from cloud-fan/map. Authored-by: Wenchen Fan <wenchen@databricks.com> Signed-off-by: Wenchen Fan <wenchen@databricks.com>
What changes were proposed in this pull request?
After #22745 , Dataset encoder supports the combination of java bean and map type. This PR is to fix the Scala side.
The reason why it didn't work before is,
CatalystToExternalMaptries to get the data type of the input map expression, while it can be unresolved and its data type is known. To fix it, we can followUnresolvedMapObjects, to create aUnresolvedCatalystToExternalMap, and only createCatalystToExternalMapwhen the input map expression is resolved and the data type is known.How was this patch tested?
enable a old test case